#ifndef CAPTUREPACKET_H
#define CAPTUREPACKET_H

#include <QObject>
#include <pcap.h>
#include <QStringList>
#include <mypacket.h>

class CapturePacket :public QObject
{
    Q_OBJECT
public:
    MyPacket* myPacket;
    CapturePacket(QObject* parent = nullptr);
signals:
    void interfacesFound(const QStringList &interfaces);
    void packetCaptured();
public slots:
    void showDeviceName();
    void capturePacket(QString time,QString from,QString to,
                       QString length,QString information);
    void startCapture(const QString& context);
    void stopCapture();
private:
    QString packetTime;
    QString packetFrom;
    QString packetTo;
    QString packetLength;
    QString packetInformation;
};

#endif // CAPTUREPACKET_H
